package cn.zjutleo.village_server.dto;

import cn.zjutleo.village_server.constants.RegexConstants;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author : Qin Zhenghan
 * @date : Created in 2021/8/23
 * @description: 腾讯云SMS短信发送DTO
 */
@Data
public class SendCodeDto {

    /**
     * 手机号
     */
    @ApiModelProperty("需获取验证码的手机号")
    @Pattern(regexp = RegexConstants.MOBILE, message = "手机号格式不正确")
    @NotEmpty(message = "手机号不能为空")
    private String phone;

    /**
     * 短信验证类型
     */
    @ApiModelProperty("短信验证类型(login等)")
    @NotEmpty(message = "短信验证类型不可为空")
    private String type;
}
